package com.spring.boot.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.spring.boot.feign.TeacherFeign;

@Service
public class UserServiceImpl {

	@Autowired
	private RestTemplate restTemplate;

	@Autowired
	private TeacherFeign teacherFeign;

	public Object getUser() {
		return restTemplate.getForObject("http://spring-boot-provider/member/getMember", String.class);
	}

	public Object getBody(String name) {
		return teacherFeign.getBody(name);
	}

	

}
